package com.cy.security.controller;

import org.springframework.security.access.annotation.Secured;
import org.springframework.security.access.prepost.PostAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class SecurityController {

    @GetMapping("/hello")
    public String hello(){
        return "hello security";
    }

    @PostAuthorize("")
    @GetMapping("/index")
    public String index(){
        return "hello index";
    }
}
